The present embodiments relate to particle-based fluid simulation of interaction with a solid object. The interaction of the solid object with fluid may be modeled in different ways.
In computational fluid dynamics (CFD), a boundary condition is a numerical condition defined at simulation space borders as well as the surfaces of solid objects within the simulation environment. Examples of boundary conditions include the no-penetration condition where the velocity normal component is zero and the free-slip condition where tangent velocity component is unchanged. Since a boundary condition applies only at a surface, both condition terms are used interchangeably. In grid-based fluid simulation, solid surfaces are handled as the boundary condition of a finite differences problem.
In a particle-based simulation approach for CFD, such as smoothed particle hydrodynamics (SPH), there is no well-defined boundary handling technique. To resolve a collision between a particle and a surface, some simple methods have been used, such as to push the colliding particle out of the solid surface and reverse its velocity normal component. However, in cases where solid objects can be moved as a result of fluid interaction, such as floating objects, a simple reflective boundary may not predict the force to be applied on the solid object.
In order to decide which particles are potentially in collision with a surface, some spatial hashing method, such as a 3D grid, is used to map between boundaries and potential fluid particles. Such approach works well in a static boundary case. However, this approach may be computationally expensive in the case of moving solid objects since the mapping is updated or re-calculated in each simulation step (over time as the object moves).